//
//  MassageDetailViewController.m
//  runingBabyModel
//
//  Created by lanou3g on 15/7/17.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "MassageDetailViewController.h"
#import "MassageViewController.h"
@interface MassageDetailViewController ()
@property (nonatomic , strong) NSString *urlStr;
@end

@implementation MassageDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIBarButtonItem *leftButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(pushAction)];
    self.navigationItem.leftBarButtonItem = leftButtonItem;
    
    self.urlStr = _htmlUrl;
    //创建一个webview用来承接网页
    UIWebView *everWebView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height + 30)];
    everWebView.backgroundColor = [UIColor colorWithRed:255/256.0 green:204/256.0 blue:204/256.0 alpha:0.8];
    [self.view addSubview:everWebView];
    everWebView.scrollView.bounces = NO;
    NSURL *url = [NSURL URLWithString:_urlStr];
    [everWebView setScalesPageToFit:YES];
    [everWebView loadRequest:[NSURLRequest requestWithURL:url]];
}
//
- (void)pushAction{
    [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
